.class final Lcom/waiqin365/lightapp/im/utils/c;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/util/Comparator;


# instance fields
.field final synthetic a:Landroid/content/Context;


# direct methods
.method constructor <init>(Landroid/content/Context;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/utils/c;->a:Landroid/content/Context;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Lcom/hyphenate/chat/EMConversation;Lcom/hyphenate/chat/EMConversation;)I
    .locals 8

    const/4 v0, 0x1

    const/4 v1, -0x1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/utils/c;->a:Landroid/content/Context;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v2

    invoke-virtual {p2}, Lcom/hyphenate/chat/EMConversation;->getUserName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/im/utils/l;->d(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/utils/c;->a:Landroid/content/Context;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v2

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMConversation;->getUserName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/im/utils/l;->d(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_1

    :cond_0
    :goto_0
    return v0

    :cond_1
    iget-object v2, p0, Lcom/waiqin365/lightapp/im/utils/c;->a:Landroid/content/Context;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v2

    invoke-virtual {p2}, Lcom/hyphenate/chat/EMConversation;->getUserName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/im/utils/l;->d(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_2

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/utils/c;->a:Landroid/content/Context;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v2

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMConversation;->getUserName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/im/utils/l;->d(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    move v0, v1

    goto :goto_0

    :cond_2
    invoke-virtual {p2}, Lcom/hyphenate/chat/EMConversation;->getLastMessage()Lcom/hyphenate/chat/EMMessage;

    move-result-object v2

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMConversation;->getLastMessage()Lcom/hyphenate/chat/EMMessage;

    move-result-object v3

    if-eqz v2, :cond_3

    if-eqz v3, :cond_3

    invoke-virtual {v2}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v4

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v6

    cmp-long v4, v4, v6

    if-nez v4, :cond_3

    const/4 v0, 0x0

    goto :goto_0

    :cond_3
    if-eqz v2, :cond_4

    if-eqz v3, :cond_4

    invoke-virtual {v2}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v4

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v2

    cmp-long v2, v4, v2

    if-gtz v2, :cond_0

    :cond_4
    move v0, v1

    goto :goto_0
.end method

.method public synthetic compare(Ljava/lang/Object;Ljava/lang/Object;)I
    .locals 1

    check-cast p1, Lcom/hyphenate/chat/EMConversation;

    check-cast p2, Lcom/hyphenate/chat/EMConversation;

    invoke-virtual {p0, p1, p2}, Lcom/waiqin365/lightapp/im/utils/c;->a(Lcom/hyphenate/chat/EMConversation;Lcom/hyphenate/chat/EMConversation;)I

    move-result v0

    return v0
.end method
